/*
 * TimeLogScheduler.cc
 *
 *  Created on: 2011-06-02
 *      Author: Jagger
 */

#include <fstream>
#include <locale>
#include <time.h>
#include "TimeLogScheduler.h"

std::ofstream out;

Register_Class(TimeLogScheduler)

void TimeLogScheduler::startRun()
{
	cSequentialScheduler::startRun();

	time_t     now;
	struct tm  *ts;
	char	   buf[512];
	char       t[80];

	now = time(0);

	ts = localtime(&now);
	strftime(t, sizeof(t), "%H-%M-%S", ts);
	sprintf(buf, "czasy %s.csv", t);
	out.open(buf);
}

void TimeLogScheduler::endRun()
{
	cSequentialScheduler::endRun();
	out.close();
}
